{*
 * This file is part of the Agora distribution. 
 * Detailed copyright and licensing information can be found
 * in the gpl-3.0.txt file which should be included in the distribution.
 * 
 * @version		$Id: 3.0.14 Olympus 2010-09-28 rammstein4o $
 * @copyright  2007 - 2010 jVitals
 * @license   GPLv3 Open Source
 * @link       http://jvitals.com
 * @since      File available since initial release
 *}
<div class="ag_postwrap">
	<div class="ag_rightend">
		<h2 class="ag_headerbar"><span class="ag_middle">##Gallery##: {$category}</span></h2>
	</div>

	<div class="ag_outerwrap">
		<form id="change_avatar" method="post" action="{$self_url}">
			<fieldset class="ag_inform">
				<legend class="ag_color">##Change Gallery##</legend>
				<div class="ag_infldsetprofile">
					<select name="category">
						{foreach from=$categories item=cur_category}
						<option {if $category eq $cur_category}selected="selected"{/if}>{$cur_category}</option>
						{/foreach}
					</select>
					<input type="submit" value="##GO##" name="submit" />
				</div>
			</fieldset>
			<input type="hidden" name="action" value="change_category" />
		</form>
		<form id="copy_av" method="post" action="{$self_url}">
			<fieldset class="ag_inform">
				<legend class="ag_color">##Select avatar##</legend>
				<div class="ag_infldsetprofile">
					<table width="100" border="0" cellpadding="0" cellspacing="0" class="ag_avatars_select">
						<tbody>
							{capture assign=agora_config_o_avatar_cols}4{/capture}{* Numbers of columns *}
							{capture assign=colsCount}1{/capture}
							{capture assign=avatarItems}{$avatars|@count}{/capture}

							{foreach name=avatars from=$avatars item=avatar key=avatar_no}
							{if $colsCount == 1}
							<tr>
							{/if}
								<td>
									<label>
										<span>
											<img src="{$avpath}{$category}/{$avatar.file}" alt='' />
										</span>
										<br /><br />
										<strong>{$avatar.name}</strong>
										<br /><br />
										<input type="radio" name="PIA" value="{$avatar.file}" />
									</label>
								</td>
							{if $avatarItems-- == 1 || $colsCount++ == $agora_config_o_avatar_cols}
							</tr>
							{capture assign=colsCount}1{/capture}
							{/if}
							{/foreach}
						</tbody>
					</table>
				</div>
			</fieldset>
			<div class="ag_postbuttons">
				<span>
					<input class="ag_button ag_btn_submit" type="submit" name="upload" value="##Submit##" title="##Submit##" accesskey="s" />
					&nbsp;##or##&nbsp;
					<a href="javascript:void(0);" class="ag_btn_goback" title="##Go back##" onclick="javascript:history.go(-1)">##Go back##</a>
				</span>
			</div>
			<input type="hidden" name="action" value="save" />
			<input type="hidden" name="category" value="{$category}" />
		</form>
	</div>
</div>